<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <link rel="icon" href="favicon.ico" type="image/x-icon"/>
    <!-- 当前页面样式 -->
    <link rel="stylesheet" href="<s:url value="/css/common.css"/>"/>
    <!-- 当前页面样式 END -->
    <script type="text/javascript" src="<c:url value="/js/jquery-1.3.2.js" />"></script>
	<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
	<script type="text/javascript" src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
	<script type="text/javascript">
	$(document).ready(function() {
		$("#szPower").click(
				function() {
					
					var dd = $("input[name=multi_sel]:checked");
					if(dd.length == 0){
						alert("请选择云商宝会员");
						return false;
					}else if(dd.length != 1){
						alert("只能选择一个会员进行审核！");
						return false;
					}else{
						var accountNo = dd.val();
						$("#queryUserForm").attr("action","<%=basePath%>/operatorAuthCheck/operatorAuthInfo.ct?receiveId="+accountNo);
						$("#queryUserForm").submit();
					}
		});
	});
	
	$(function(){
		$("#collarNum").change(function(){
			var collarNum = $(this).val();
			var checkBoxs = $(":input[name=multi_sel]");
			checkBoxs.each(function(){
				$(this).attr("checked",false);
			});
			var count = 0;
			checkBoxs.each(function(){
				
				if(count < parseInt(collarNum)){
					$(this).attr("checked","true");
				}else{
					return false;
				}
				count ++;
			}); 
		});
	});
	
	function queryForm(){
		$("#queryUserForm").attr("action","<%=basePath%>/operatorAuthCheck/queryOperatorsAuthCheck.ct");
		$("#queryUserForm").submit();
	}
	
	$("#szPower").click(
			function() {
				
				var dd = $("input[name=multi_sel]:checked");
				if(dd.length == 0){
					alert("请选择商服宝会员");
					return false;
				}else if(dd.length != 1){
					alert("只能选择一个会员进行审核！");
					return false;
				}else{
					var accountNo = dd.val();
					console.log(accountNo);
					$("#queryUserForm").attr("action","<%=basePath%>/operatorAuthCheck/operatorAuthInfo.ct?receiveId="+accountNo);
					$("#queryUserForm").submit();
				}
	});
	
	function toCheckJsp(id){
		$("#queryUserForm").attr("action","<%=basePath%>/operatorAuthCheck/operatorAuthInfo.ct?receiveId="+id);
		$("#queryUserForm").submit();
	}
	
	function toShowJsp(id){
		$("#queryUserForm").attr("action","<%=basePath%>/operatorAuthCheck/operatorAuthInfoShow.ct?receiveId="+id);
		$("#queryUserForm").submit();
	}
	
	
</script>
</head>
<body>
<s:form id="queryUserForm" action="" method="post" theme="simple">
<table class="tb">
    <tbody>
        <tr class="tb-line">
            <td class="tb-td" colspan="6"><div class="tb-h2">POS收单运营管理平台</div></td>
        </tr>

        <tr class="tb-line">
            <td class="tb-td" colspan="6"><div class="tb-h3">实名审核</div></td>
        </tr>
 
        <tr class="tb-line">
            <td align="right" class="tb-td">
                <div class="tb-h4">会员手机号：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal">
                	<s:textfield  name="searchCondition.accountNo" />
               	</label>
            </td>
             <td align="right" class="tb-td">
                <div class="tb-h4">会员姓名：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal">
                	<s:textfield  name="searchCondition.realName" />
               	</label>
            </td>
             <td align="right" class="tb-td">
                <div class="tb-h4">身份证号码：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal">
                	<s:textfield  name="searchCondition.idCard" />
               	</label>
            </td>
             
        </tr>

		
        <tr class="tb-line">
            <td class="tb-td line-submit" align="right" colspan="6">
                <label class="tb-input-submit">
                    <input type="button" value="查询"  onclick='queryForm()'/>
                </label>
                <label class="tb-input-submit">
                    <input type="reset" value="取消"/>
                </label>
                
	        	<!-- <label class="tb-input-submit">
                    <input id="szPower" type="button"  value="审核" />
                </label> -->
	        
            </td>
        </tr>
        
        <tr class="tb-line">
            <td class="tb-td line-submit" align="center" colspan="6">
                 <font color="red">
                 	<s:actionmessage/><s:actionerror/>
                 </font>
            </td>
        </tr>
         
        <s:if test="#request.searchRsList != null && #request.searchRsList.size>0 ">
			<tr class="tb-line">
				<td class="tb-td paging"  align="left" colspan="6"> 
					 	<page:pageCount max_pages="11" totalPage="${requestScope.totalPage}"
						currentPage="${requestScope.currentPage}"
						action="${rootPath}/operatorAuthCheck/queryOperatorsAuthCheck.ct?currentPage=" />

				</td>
			</tr>
		</s:if>
    </tbody>
</table>
</s:form>
<div class="big-tb">
    <table class="tb" style="width: 100%;">
        <thead>
            <tr class="tb-line">
                <th class="tb-th" colspan="8">会员基本信息列表</th>
            </tr>
            <tr class="tb-line bg-gray">
				<th class="tb-th">会员账号</th>
				<th class="tb-th">证件类型</th>
				<th class="tb-th">真实姓名</th>
				<th class="tb-th">证件号</th>
				<th class="tb-th">有效期</th>
				<th class="tb-th">提交时间</th>
				<th class="tb-th">领件时间</th>
				<th class="tb-th">操作</th>
            </tr>
        </thead>
        <tbody>
			<s:iterator value="#request.searchRsList" status="stat" id="sh">
				<tr class="tb-line" >
					<td class="tb-td"><s:property value="#sh.accountNo"/></td>
					<td class="tb-td">
			        	<s:property value="#sh.cardType"/>
			        </td>
					<td class="tb-td"><s:property value="#sh.userName"/></td>
			        <td class="tb-td"><s:property value="#sh.cardNo"/></td>	
			        <td class="tb-td">
			        <s:if test="#sh.ext1 != null && #sh.ext1 != ''">
			        <s:property value="#sh.ext1"/>--<s:property value="#sh.ext2"/>
			        </s:if>
			        </td>		        
			        <td class="tb-td"><s:property value="#sh.createAtStr"/></td>
			        <td class="tb-td"><s:property value="#sh.createAtStrR"/></td>
			        <td align="center" class="tb-td">
			        	<input value="查看" type="button" onclick="toShowJsp(<s:property value="#sh.receiveId"/>)"/>
			        	<input value="审核" type="button" onclick="toCheckJsp(<s:property value="#sh.receiveId"/>)"/>
			        </td>
			      </tr>
			</s:iterator>
		</tbody>
    </table>  
</div>
</body>
</html>